﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using EditorialProyectos.Business.Entities.Enum;
using Whoever.Framework.Base;

using Whoever.Framework.Attributes;

namespace EditorialProyectos.Business.Entities
{
    public class Project : BusinessEntity
    {
        public string Html { get; set; }

        [GridDisplayable]
        [Required]
        [MaxLength(30)]
        public string Title { get; set; }
        [GridDisplayable]
        public string Description { get; set; }
        public string Image { get; set; }
        [Range(0, int.MaxValue)]
        public int? Cost { get; set; }
        [Range(0, int.MaxValue)]
        public int? MinimalInversion { get; set; }
        public string SocialAction { get; set; }
        public DateTime RevisionDate { get; set; }
        public DateTime StartDate { get; set; }
        public DateTime DeadLine { get; set; }
        [GridDisplayable]
        public ProjectState State { get; set; }
        public string UserId { get; set; }
        [Required]
        public int CategoryId { get; set; }

        public virtual ApplicationUser User { get; set; }
        public virtual Category Category { get; set; }
        public virtual ICollection<Comment> Comments { get; set; }
        public virtual ICollection<Investment> Investments { get; set; }
        public virtual ICollection<Vote> Votes { get; set; }
        public virtual ICollection<Benefit> Benefits { get; set; }
    }
}
